<?php

/**
 * 配置类相关
 *
 * @author JiangJian <silverd@sohu.com>
 * $Id: Config.php 172 2012-11-20 03:37:20Z silverd30@gmail.com $
 */

class Core_Config
{
    private static $_data;

    public static function load($fileName)
    {
        if (! isset(self::$_data[$fileName])) {
            self::$_data[$fileName] = include APP_PATH . 'Conf/' . $fileName . '.conf.php';
        }

        return self::$_data[$fileName];
    }

    public static function loadEnv($fileName)
    {
        return self::load(CODE_ENV . '/' . $fileName);
    }
}